Integrand size = 21, antiderivative size = 232 \[ \int \sqrt {d \cot (e+f x)} \tan ^4(e+f x) \, dx=\frac {\sqrt {d} \arctan \left (1-\frac {\sqrt {2} \sqrt {d \cot (e+f x)}}{\sqrt {d}}\right )}{\sqrt {2} f}-\frac {\sqrt {d} \arctan \left (1+\frac {\sqrt {2} \sqrt {d \cot (e+f x)}}{\sqrt {d}}\right )}{\sqrt {2} f}+\frac {2 d^3}{5 f (d \cot (e+f x))^{5/2}}-\frac {2 d}{f \sqrt {d \cot (e+f x)}}-\frac {\sqrt {d} \log \left (\sqrt {d}+\sqrt {d} \cot (e+f x)-\sqrt {2} \sqrt {d \cot (e+f x)}\right )}{2 \sqrt {2} f}+\frac {\sqrt {d} \log \left (\sqrt {d}+\sqrt {d} \cot (e+f x)+\sqrt {2} \sqrt {d \cot (e+f x)}\right )}{2 \sqrt {2} f} \]
[Out]
Time = 0.25 (sec) , antiderivative size = 232, normalized size of antiderivative = 1.00, number of steps used = 14, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.476, Rules used = {16, 3555, 3557, 335, 303, 1176, 631, 210, 1179, 642} \[ \int \sqrt {d \cot (e+f x)} \tan ^4(e+f x) \, dx=\frac {\sqrt {d} \arctan \left (1-\frac {\sqrt {2} \sqrt {d \cot (e+f x)}}{\sqrt {d}}\right )}{\sqrt {2} f}-\frac {\sqrt {d} \arctan \left (\frac {\sqrt {2} \sqrt {d \cot (e+f x)}}{\sqrt {d}}+1\right )}{\sqrt {2} f}+\frac {2 d^3}{5 f (d \cot (e+f x))^{5/2}}-\frac {2 d}{f \sqrt {d \cot (e+f x)}}-\frac {\sqrt {d} \log \left (\sqrt {d} \cot (e+f x)-\sqrt {2} \sqrt {d \cot (e+f x)}+\sqrt {d}\right )}{2 \sqrt {2} f}+\frac {\sqrt {d} \log \left (\sqrt {d} \cot (e+f x)+\sqrt {2} \sqrt {d \cot (e+f x)}+\sqrt {d}\right )}{2 \sqrt {2} f} \]
[In]
[Out]
Rule 16
Rule 210
Rule 303
Rule 335
Rule 631
Rule 642
Rule 1176
Rule 1179
Rule 3555
Rule 3557
Rubi steps \begin{align*} \text {integral}& = d^4 \int \frac {1}{(d \cot (e+f x))^{7/2}} \, dx \\ & = \frac {2 d^3}{5 f (d \cot (e+f x))^{5/2}}-d^2 \int \frac {1}{(d \cot (e+f x))^{3/2}} \, dx \\ & = \frac {2 d^3}{5 f (d \cot (e+f x))^{5/2}}-\frac {2 d}{f \sqrt {d \cot (e+f x)}}+\int \sqrt {d \cot (e+f x)} \, dx \\ & = \frac {2 d^3}{5 f (d \cot (e+f x))^{5/2}}-\frac {2 d}{f \sqrt {d \cot (e+f x)}}-\frac {d \text {Subst}\left (\int \frac {\sqrt {x}}{d^2+x^2} \, dx,x,d \cot (e+f x)\right )}{f} \\ & = \frac {2 d^3}{5 f (d \cot (e+f x))^{5/2}}-\frac {2 d}{f \sqrt {d \cot (e+f x)}}-\frac {(2 d) \text {Subst}\left (\int \frac {x^2}{d^2+x^4} \, dx,x,\sqrt {d \cot (e+f x)}\right )}{f} \\ & = \frac {2 d^3}{5 f (d \cot (e+f x))^{5/2}}-\frac {2 d}{f \sqrt {d \cot (e+f x)}}+\frac {d \text {Subst}\left (\int \frac {d-x^2}{d^2+x^4} \, dx,x,\sqrt {d \cot (e+f x)}\right )}{f}-\frac {d \text {Subst}\left (\int \frac {d+x^2}{d^2+x^4} \, dx,x,\sqrt {d \cot (e+f x)}\right )}{f} \\ & = \frac {2 d^3}{5 f (d \cot (e+f x))^{5/2}}-\frac {2 d}{f \sqrt {d \cot (e+f x)}}-\frac {\sqrt {d} \text {Subst}\left (\int \frac {\sqrt {2} \sqrt {d}+2 x}{-d-\sqrt {2} \sqrt {d} x-x^2} \, dx,x,\sqrt {d \cot (e+f x)}\right )}{2 \sqrt {2} f}-\frac {\sqrt {d} \text {Subst}\left (\int \frac {\sqrt {2} \sqrt {d}-2 x}{-d+\sqrt {2} \sqrt {d} x-x^2} \, dx,x,\sqrt {d \cot (e+f x)}\right )}{2 \sqrt {2} f}-\frac {d \text {Subst}\left (\int \frac {1}{d-\sqrt {2} \sqrt {d} x+x^2} \, dx,x,\sqrt {d \cot (e+f x)}\right )}{2 f}-\frac {d \text {Subst}\left (\int \frac {1}{d+\sqrt {2} \sqrt {d} x+x^2} \, dx,x,\sqrt {d \cot (e+f x)}\right )}{2 f} \\ & = \frac {2 d^3}{5 f (d \cot (e+f x))^{5/2}}-\frac {2 d}{f \sqrt {d \cot (e+f x)}}-\frac {\sqrt {d} \log \left (\sqrt {d}+\sqrt {d} \cot (e+f x)-\sqrt {2} \sqrt {d \cot (e+f x)}\right )}{2 \sqrt {2} f}+\frac {\sqrt {d} \log \left (\sqrt {d}+\sqrt {d} \cot (e+f x)+\sqrt {2} \sqrt {d \cot (e+f x)}\right )}{2 \sqrt {2} f}-\frac {\sqrt {d} \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1-\frac {\sqrt {2} \sqrt {d \cot (e+f x)}}{\sqrt {d}}\right )}{\sqrt {2} f}+\frac {\sqrt {d} \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1+\frac {\sqrt {2} \sqrt {d \cot (e+f x)}}{\sqrt {d}}\right )}{\sqrt {2} f} \\ & = \frac {\sqrt {d} \arctan \left (1-\frac {\sqrt {2} \sqrt {d \cot (e+f x)}}{\sqrt {d}}\right )}{\sqrt {2} f}-\frac {\sqrt {d} \arctan \left (1+\frac {\sqrt {2} \sqrt {d \cot (e+f x)}}{\sqrt {d}}\right )}{\sqrt {2} f}+\frac {2 d^3}{5 f (d \cot (e+f x))^{5/2}}-\frac {2 d}{f \sqrt {d \cot (e+f x)}}-\frac {\sqrt {d} \log \left (\sqrt {d}+\sqrt {d} \cot (e+f x)-\sqrt {2} \sqrt {d \cot (e+f x)}\right )}{2 \sqrt {2} f}+\frac {\sqrt {d} \log \left (\sqrt {d}+\sqrt {d} \cot (e+f x)+\sqrt {2} \sqrt {d \cot (e+f x)}\right )}{2 \sqrt {2} f} \\ \end{align*}
Time = 0.58 (sec) , antiderivative size = 109, normalized size of antiderivative = 0.47 \[ \int \sqrt {d \cot (e+f x)} \tan ^4(e+f x) \, dx=-\frac {\sqrt {d \cot (e+f x)} \left (-2+10 \cot ^2(e+f x)+5 \arctan \left (\sqrt [4]{-\cot ^2(e+f x)}\right ) \sqrt [4]{-\cot (e+f x)} \cot ^{\frac {9}{4}}(e+f x)+5 \text {arctanh}\left (\sqrt [4]{-\cot ^2(e+f x)}\right ) \left (-\cot ^2(e+f x)\right )^{5/4}\right ) \tan ^3(e+f x)}{5 f} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(706\) vs. \(2(179)=358\).
Time = 17.60 (sec) , antiderivative size = 707, normalized size of antiderivative = 3.05
method | result | size |
default | \(-\frac {\csc \left (f x +e \right ) \sqrt {-\frac {d \left (\csc \left (f x +e \right ) \left (1-\cos \left (f x +e \right )\right )^{2}-\sin \left (f x +e \right )\right )}{1-\cos \left (f x +e \right )}}\, \left (1-\cos \left (f x +e \right )\right ) \left (-40 \left (\csc ^{7}\left (f x +e \right )\right ) \left (1-\cos \left (f x +e \right )\right )^{7}+5 \ln \left (\frac {\csc \left (f x +e \right ) \left (1-\cos \left (f x +e \right )\right )^{2}+2 \sin \left (f x +e \right ) \sqrt {\left (\csc ^{3}\left (f x +e \right )\right ) \left (1-\cos \left (f x +e \right )\right )^{3}-\csc \left (f x +e \right )+\cot \left (f x +e \right )}+2-2 \cos \left (f x +e \right )-\sin \left (f x +e \right )}{1-\cos \left (f x +e \right )}\right ) {\left (\left (\csc ^{3}\left (f x +e \right )\right ) \left (1-\cos \left (f x +e \right )\right )^{3}-\csc \left (f x +e \right )+\cot \left (f x +e \right )\right )}^{\frac {5}{2}}-10 \arctan \left (\frac {\sin \left (f x +e \right ) \sqrt {\left (\csc ^{3}\left (f x +e \right )\right ) \left (1-\cos \left (f x +e \right )\right )^{3}-\csc \left (f x +e \right )+\cot \left (f x +e \right )}+1-\cos \left (f x +e \right )}{1-\cos \left (f x +e \right )}\right ) {\left (\left (\csc ^{3}\left (f x +e \right )\right ) \left (1-\cos \left (f x +e \right )\right )^{3}-\csc \left (f x +e \right )+\cot \left (f x +e \right )\right )}^{\frac {5}{2}}-5 \ln \left (-\frac {-\csc \left (f x +e \right ) \left (1-\cos \left (f x +e \right )\right )^{2}+2 \sin \left (f x +e \right ) \sqrt {\left (\csc ^{3}\left (f x +e \right )\right ) \left (1-\cos \left (f x +e \right )\right )^{3}-\csc \left (f x +e \right )+\cot \left (f x +e \right )}-2+2 \cos \left (f x +e \right )+\sin \left (f x +e \right )}{1-\cos \left (f x +e \right )}\right ) {\left (\left (\csc ^{3}\left (f x +e \right )\right ) \left (1-\cos \left (f x +e \right )\right )^{3}-\csc \left (f x +e \right )+\cot \left (f x +e \right )\right )}^{\frac {5}{2}}-10 \arctan \left (\frac {\sin \left (f x +e \right ) \sqrt {\left (\csc ^{3}\left (f x +e \right )\right ) \left (1-\cos \left (f x +e \right )\right )^{3}-\csc \left (f x +e \right )+\cot \left (f x +e \right )}-1+\cos \left (f x +e \right )}{1-\cos \left (f x +e \right )}\right ) {\left (\left (\csc ^{3}\left (f x +e \right )\right ) \left (1-\cos \left (f x +e \right )\right )^{3}-\csc \left (f x +e \right )+\cot \left (f x +e \right )\right )}^{\frac {5}{2}}+112 \left (\csc ^{5}\left (f x +e \right )\right ) \left (1-\cos \left (f x +e \right )\right )^{5}-40 \left (\csc ^{3}\left (f x +e \right )\right ) \left (1-\cos \left (f x +e \right )\right )^{3}\right ) \sqrt {2}}{20 f \sqrt {\csc \left (f x +e \right ) \left (\left (\csc ^{2}\left (f x +e \right )\right ) \left (1-\cos \left (f x +e \right )\right )^{2}-1\right ) \left (1-\cos \left (f x +e \right )\right )}\, {\left (\left (\csc ^{3}\left (f x +e \right )\right ) \left (1-\cos \left (f x +e \right )\right )^{3}-\csc \left (f x +e \right )+\cot \left (f x +e \right )\right )}^{\frac {5}{2}}}\) | \(707\) |
[In]
[Out]
Result contains complex when optimal does not.
Time = 0.28 (sec) , antiderivative size = 212, normalized size of antiderivative = 0.91 \[ \int \sqrt {d \cot (e+f x)} \tan ^4(e+f x) \, dx=-\frac {5 \, f \left (-\frac {d^{2}}{f^{4}}\right )^{\frac {1}{4}} \log \left (f^{3} \left (-\frac {d^{2}}{f^{4}}\right )^{\frac {3}{4}} + d \sqrt {\frac {d}{\tan \left (f x + e\right )}}\right ) - 5 i \, f \left (-\frac {d^{2}}{f^{4}}\right )^{\frac {1}{4}} \log \left (i \, f^{3} \left (-\frac {d^{2}}{f^{4}}\right )^{\frac {3}{4}} + d \sqrt {\frac {d}{\tan \left (f x + e\right )}}\right ) + 5 i \, f \left (-\frac {d^{2}}{f^{4}}\right )^{\frac {1}{4}} \log \left (-i \, f^{3} \left (-\frac {d^{2}}{f^{4}}\right )^{\frac {3}{4}} + d \sqrt {\frac {d}{\tan \left (f x + e\right )}}\right ) - 5 \, f \left (-\frac {d^{2}}{f^{4}}\right )^{\frac {1}{4}} \log \left (-f^{3} \left (-\frac {d^{2}}{f^{4}}\right )^{\frac {3}{4}} + d \sqrt {\frac {d}{\tan \left (f x + e\right )}}\right ) - 4 \, {\left (\tan \left (f x + e\right )^{3} - 5 \, \tan \left (f x + e\right )\right )} \sqrt {\frac {d}{\tan \left (f x + e\right )}}}{10 \, f} \]
[In]
[Out]
\[ \int \sqrt {d \cot (e+f x)} \tan ^4(e+f x) \, dx=\int \sqrt {d \cot {\left (e + f x \right )}} \tan ^{4}{\left (e + f x \right )}\, dx \]
[In]
[Out]
none
Time = 0.33 (sec) , antiderivative size = 207, normalized size of antiderivative = 0.89 \[ \int \sqrt {d \cot (e+f x)} \tan ^4(e+f x) \, dx=-\frac {d^{5} {\left (\frac {5 \, {\left (\frac {2 \, \sqrt {2} \arctan \left (\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {d} + 2 \, \sqrt {\frac {d}{\tan \left (f x + e\right )}}\right )}}{2 \, \sqrt {d}}\right )}{\sqrt {d}} + \frac {2 \, \sqrt {2} \arctan \left (-\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {d} - 2 \, \sqrt {\frac {d}{\tan \left (f x + e\right )}}\right )}}{2 \, \sqrt {d}}\right )}{\sqrt {d}} - \frac {\sqrt {2} \log \left (\sqrt {2} \sqrt {d} \sqrt {\frac {d}{\tan \left (f x + e\right )}} + d + \frac {d}{\tan \left (f x + e\right )}\right )}{\sqrt {d}} + \frac {\sqrt {2} \log \left (-\sqrt {2} \sqrt {d} \sqrt {\frac {d}{\tan \left (f x + e\right )}} + d + \frac {d}{\tan \left (f x + e\right )}\right )}{\sqrt {d}}\right )}}{d^{4}} - \frac {8 \, {\left (d^{2} - \frac {5 \, d^{2}}{\tan \left (f x + e\right )^{2}}\right )}}{d^{4} \left (\frac {d}{\tan \left (f x + e\right )}\right )^{\frac {5}{2}}}\right )}}{20 \, f} \]
[In]
[Out]
\[ \int \sqrt {d \cot (e+f x)} \tan ^4(e+f x) \, dx=\int { \sqrt {d \cot \left (f x + e\right )} \tan \left (f x + e\right )^{4} \,d x } \]
[In]
[Out]
Time = 2.81 (sec) , antiderivative size = 97, normalized size of antiderivative = 0.42 \[ \int \sqrt {d \cot (e+f x)} \tan ^4(e+f x) \, dx=\frac {\frac {2\,d^3}{5}-\frac {2\,d^3}{{\mathrm {tan}\left (e+f\,x\right )}^2}}{f\,{\left (\frac {d}{\mathrm {tan}\left (e+f\,x\right )}\right )}^{5/2}}-\frac {{\left (-1\right )}^{1/4}\,\sqrt {d}\,\mathrm {atan}\left (\frac {{\left (-1\right )}^{1/4}\,\sqrt {\frac {d}{\mathrm {tan}\left (e+f\,x\right )}}}{\sqrt {d}}\right )}{f}+\frac {{\left (-1\right )}^{1/4}\,\sqrt {d}\,\mathrm {atanh}\left (\frac {{\left (-1\right )}^{1/4}\,\sqrt {\frac {d}{\mathrm {tan}\left (e+f\,x\right )}}}{\sqrt {d}}\right )}{f} \]
[In]
[Out]